#ifndef NETWORKMONITOR_H
#define NETWORKMONITOR_H

#include <stdio.h>
#include <stdlib.h>
#include <pcap.h>
#include <errno.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <net/ethernet.h>
#include <netinet/udp.h>
#include <netinet/tcp.h>
#include <string.h>

#include "ip.h"
#include "icmp.h"
#include "arp.h"

class NetworkMonitor
{
public:
    NetworkMonitor();
private:
    // TCP处理函数
    void tcp_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);
    // UDP处理函数
    void  udp_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);
    // ICMP处理函数
    void  icmp_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);
    // ARP处理函数
    void  arp_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);
    // IP处理函数
    void  ip_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);
    // Ethernet处理函数
    void  ethernet_protocol_packet_callback(u_char *argument,const struct pcap_pkthdr *packet_header,const u_char *packet_content);


};

#endif // NETWORKMONITOR_H
